package com.shenhua.kunpeng.utils;


import com.dangdang.ddframe.rdb.sharding.id.generator.IdGenerator;
import com.dangdang.ddframe.rdb.sharding.id.generator.self.IPIdGenerator;

/**
 * id 生成器
 */
public class IdUtils {
    private static IdGenerator ID_Generator = new IPIdGenerator();

    public static long generatorId() {
        return ID_Generator.generateId().longValue();
    }

    public static void main(String[] args) {
    System.out.println(generatorId());
    }
}
